#ifndef __ISOUNDEFFECT_OBSERVER_H__
#define __ISOUNDEFFECT_OBSERVER_H__

#pragma once
#include "thread.h"



namespace audio {

class ISoundEffect;

/**
 * \ingroup CoreEngine
 *
 *	Class to observe an ISoundEffect in order
 *	to delete it after beeing played.
 *
 * \date 06-22-2007
 *
 * \author Karl Moik
 *
 * \todo 
 *
 * \bug 
 *
 */
class DLL_EXPORT ISoundEffect_observer :
	public thread::IRunnable
{
public:
	ISoundEffect_observer(ISoundEffect* _pISoundEffect, int _sleepTime = 100);
	virtual ~ISoundEffect_observer(void);

	void run();
	void stop();

protected:
	ISoundEffect* m_pISoundEffect;
	thread::Thread*	m_pThread;
	int mifSleepTime;
	bool m_bRunning;
};

} // namespace audio

#endif // __ISOUNDEFFECT_OBSERVER_H__